package com.b.domain;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 点赞记录表
    */
@Document(indexName = "likerecord")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LikeRecord {
    /**
    * 点赞记录ID
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 点赞用户ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer userId;

    /**
    * 内容ID（视频/评论/动态）
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer targetId;

    /**
    * 内容类型
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String targetType;

    /**
    * 点赞时间
    */
    @Field(type = FieldType.Date, index = false , store = true)
    private Date createTime;
}